set(EXE ama-service)
add_executable(${EXE}
  AmaInstance.cpp
  DolphindbInstance.cpp
  QuoteAmaLiteService.cpp
  main.cpp)
target_link_libraries(${EXE}
  PRIVATE
    Folly::folly Folly::folly_deps
    DolphinDBAPI
    ama-deps)

if (UNIX)
# 查找 GoogleTest 包
find_package(GTest CONFIG REQUIRED)

# Tests
add_executable(${EXE}-test test/AmdUtilTest.cpp)
target_link_libraries(${EXE}-test PRIVATE Folly::folly Folly::folly_deps follybenchmark GTest::gtest GTest::gtest_main)

# 启用测试
enable_testing()
# 添加测试
add_test(NAME ParseDateTimeTest COMMAND ParseDateTimeTest)
endif ()
